package com.gsxi.tyagbackend.controller;

import com.gsxi.tyagbackend.aop.ApiOperationLog;
import com.gsxi.tyagbackend.utils.enums.ResponseCodeEnum;
import com.gsxi.tyagbackend.utils.exception.BizException;
import com.gsxi.tyagbackend.utils.result.AjaxResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author 顾森希
 * @version 1.0
 * @Date 6/17/2024 5:48 PM
 */
@RestController
@Slf4j
public class TestController {
    @GetMapping("/test")
    @ApiOperationLog(description = "测试接口")
    public AjaxResult test(Integer id) {
        // 返参
        return AjaxResult.ok(id);
    }

    @GetMapping("/test1")
    @ApiOperationLog(description = "测试接口1")
    public AjaxResult test1(Integer id) {
        int i = 1 / 0;
        return AjaxResult.ok(id);

    }

}
